package org.mnswf.model {
	
	public class Message {
		
		[Bindable]
		public var id:int;
		[Bindable]
		public var fromEmail:String;
		[Bindable]
		public var subject:String;
		[Bindable]
		public var body:String;
		[Bindable]
		public var dateAdded:String;
		
		public function Message() {
			id = -1;
		}
		
		public function parseTransferObject(transferObject:Object):void {
			id = (transferObject.ID != null) ? transferObject.ID : transferObject.id;
			fromEmail = (transferObject.FROMEMAIL != null) ? transferObject.FROMEMAIL : transferObject.fromEmail;
			subject = (transferObject.SUBJECT != null) ? transferObject.SUBJECT : transferObject.subject;
			body = (transferObject.BODY != null) ? transferObject.BODY : transferObject.body;
			dateAdded = (transferObject.DATEADDED != null) ? transferObject.DATEADDED : transferObject.dateAdded;
		}
		
	}
	
}